package com.fang.zuoye;

public class student extends Person {
    //创建一个子类Student，继承Person类，给子类添加新的属性及方法；创建子类对象，调用父类及子类方法；

    private String schoolName;
    private String schoolNum;


    public student() {
    }

    public student(String schoolName, String schoolNum) {
        this.schoolName = schoolName;
        this.schoolNum = schoolNum;
    }

    public String getSchoolName() {
        return schoolName;
    }

    public void setSchoolName(String schoolName) {
        this.schoolName = schoolName;
    }

    public String getSchoolNum() {
        return schoolNum;
    }

    public void setSchoolNum(String schoolNum) {
        this.schoolNum = schoolNum;
    }
    public void studying(){
        System.out.println(getName()+"正在学习");
    }

    public static void main(String[] args) {
        student stu = new student();
        stu.setName("小明");
        stu.studying();
        stu.sayHi();
        Person.sayHello("小张");   }
}
